package bottle.service.impl;

import bottle.entity.Wxbottle;
import bottle.entity.Wxuserbottle;
import bottle.mapper.WxbottleMapper;
import bottle.service.Wxbottleservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Wxbottleserviceimpl implements Wxbottleservice {
    @Autowired
    WxbottleMapper wxbottleMapper;

    @Override
    public List<Wxbottle> selectByPrimaryKey(String openid) {

        return wxbottleMapper.selectByPrimaryKey(openid);
    }

    @Override
    public Integer insertSelective(Wxbottle wxbottle) {

        wxbottle.setBottlecount(0);
        return wxbottleMapper.insertSelective(wxbottle);
    }

    @Override
    public Integer updateByPrimaryKeySelective(Wxbottle wxbottle) {
        return wxbottleMapper.updateByPrimaryKeySelective(wxbottle);
    }

    @Override
    public Integer deleteByPrimaryKey(Integer id) {
        return wxbottleMapper.deleteByPrimaryKey(id);
    }

    @Override
    public Wxbottle selectBYReadpt(String openid) {
        return wxbottleMapper.selectBYReadpt(openid);
    }

    @Override
    public Wxbottle selectBYReadjy() {
        return wxbottleMapper.selectBYReadjy();
    }

    @Override
    public Integer insertSelectiveuser(Wxuserbottle wxuserbottle) {
        return wxbottleMapper.insertSelectiveuser(wxuserbottle);
    }

    @Override
    public Wxbottle selectByid(Integer id) {
        return wxbottleMapper.selectByid(id);
    }

    @Override
    public List<Wxbottle> SelectcountOpenidkey(String openid) {
        return wxbottleMapper.SelectcountOpenidkey(openid);
    }
}
